/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package br.com.foxline.manager;

import br.com.foxline.model.Country;
import br.com.foxline.service.CountryService;
import java.io.Serializable;
import java.util.List;
import javax.ejb.EJB;
import javax.faces.bean.ManagedBean;
import javax.faces.bean.ViewScoped;

/**
 *
 * @author roniere
 */
@ManagedBean
@ViewScoped
public class ManagerCountry implements Serializable{
    
    @EJB
    CountryService countryService;
    
    public List<Country> autoComplete(String query){
        return countryService.findAll();
    }
    
    public List<Country> countrys(String query) {
        return countryService.autocomplete(query);
    }
    
}
